package com.clip.entity.compare;

import java.util.Comparator;

import com.clip.entity.virtual.EventForView;

public class EventForViewCompare implements Comparator<EventForView>{

	@Override
	public int compare(EventForView o1, EventForView o2) {
		if(o1.isAllDay()&&o2.isAllDay()){
			return o1.getStarttime().compareTo(o2.getStarttime());
		}else if(o1.isAllDay()){
			return 1;
		}else if(o2.isAllDay()){
			return -1;
		}else{
			return o1.getStarthour().compareTo(o2.getStarthour());
		}
	}
	
}
